﻿using System;
using System.Text;

class Ex7EncodingTools
{
    static void Main()
    {
        string input = "Т'ва е доста готин тест! Но, не покрива голям% от случаите :) Let's see whats happening";

        byte[] arrayOfUTF8 = Encoding.UTF8.GetBytes(input);
        Console.WriteLine("UTF8"+BitConverter.ToString(arrayOfUTF8));

        byte[] arrayOfASCII = Encoding.ASCII.GetBytes(input);
        Console.WriteLine("ASCII" + BitConverter.ToString(arrayOfASCII));

        byte[] arrayUnicode = Encoding.Unicode.GetBytes(input);
        Console.WriteLine("Unicode" + BitConverter.ToString(arrayUnicode));

        Encoding windows1251 = Encoding.GetEncoding("windows-1251");
        byte[] winArray = windows1251.GetBytes(input);
        Console.WriteLine("Win-1251" + BitConverter.ToString(winArray));

        Console.WriteLine(Encoding.UTF8.GetString(arrayOfUTF8));
        Console.WriteLine(Encoding.ASCII.GetString(arrayOfASCII));
        Console.WriteLine(Encoding.Unicode.GetString(arrayUnicode));
        Console.WriteLine(windows1251.GetString(winArray));
    }
}

